﻿using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Acoris.Note.Core
{
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Resources;

    public sealed class AcorisNoteXAMLResourceLoader:CustomXamlResourceLoader
    {
        ResourceDictionary _resourceManager;

        public AcorisNoteXAMLResourceLoader(ResourceDictionary dictionary)
        {
            Debug.Assert(dictionary != null);
            _resourceManager = dictionary ?? throw new NullReferenceException();
        }

        protected override object GetResource(string resourceId, string objectType, string propertyName, string propertyType)
        {
            return _resourceManager[resourceId];
        }               
    }
}
